import { defineStore } from "pinia";
import { ref } from 'vue'

export const usePreviewDataStore = defineStore('PreviewData', () => {

	// 已加载的图片
	const loadedList = ref([])

	// 添加数据
	const updateList = (data) => {
		loadedList.value.push(...data)
	}

	// 清除数据
	const deleteList = () => {
		loadedList.value = []
	}

	return {
		loadedList,
		updateList,
		deleteList
	}
})